<!-- 令牌购买 -->
<template>
  <div class="pag" >
      <cube-popup type="my-popup" ref="ads-active" maskClosable v-show="showAds">
          <div class="active-ct">
              <div class="content">
                  <div ref="look-active-scroll" style="background:#fff;">
                      <!--<h2>名词解释</h2>-->
                      <p>一个令牌可拆分成5块碎片。</p>
                      <p>路由器每个挖矿节点质押一块碎片即可参与挖矿结算。</p>
                      <p>自有闲置令牌只记录拥有的完整令牌数量。</p>
                      <p>质押第1块碎片会占用一个闲置令牌；</p>
                      <p>质押到第6块碎片时占用第二块闲置令牌，以此类推。</p>
                      <p>令牌和碎片之间的切换根据用户的质押和撤销操作自动完成。</p>
                      <h3><span>*</span>默认按照质押的顺序来拆分令牌的碎片。撤销掉一个完整的令牌也需要撤销当初拆分一个完整令牌5个碎片的节点。</h3>
                      <h1>“碎片数量”即为路由器可质押挖矿的节点数量</h1>
                  </div>
              </div>
              <div class="close">
                  <p @click="closeActive">确定</p>
              </div>
          </div>
      </cube-popup>
      <cube-popup type="my-popup" ref="warn-active" maskClosable v-show="showWarn">
          <div class="active-ct">
              <div class="content">
                  <div ref="look-active-scroll" style="background:#fff;">
                      <h2>提示</h2>
                      <p style="text-align:center;">可用碎片已质押完毕
                      </p>
                      <p style="text-align:center;">仍有 <span style="color:#DC0630;">{{violationNum}}</span> 个节点没有质押碎片</p>
                  </div>
              </div>
              <div class="close">
                  <p @click="closeWarn">确定</p>
              </div>
          </div>
      </cube-popup>
      <cube-scroll ref="scroll" :data="offerList" :options="options" @pulling-up="onPullingUp" @scroll="pageScroll" :scrollEvents="['scroll']">
          <div class="pledge-banner router-pledge">
              <h3>路由器挖矿令牌质押</h3>
              <div class="pledge-banner-content">
                  <div>开启的<i style="color:#FF1140;"> {{ nodeNum }} </i>个节点中</div>
                  <div>共<i style="color:#E1EE10;">{{ nodePledgeNum }}</i>个节点质押了碎片</div>
                  <div>({{tokenNum}}块令牌)</div>
              </div>
          </div>
          <div class="token-types">
              <img src="~assets/images/token/token-x.png" alt="" />
              自有闲置令牌：{{ selfIdleNum }}
              <span></span>
              <div style="display: flex;align-items: center" :style="{opacity: rentNum > 0 ? 1 : 0}">
                  <img src="~assets/images/token/token-z.png" alt="" />
                  租借闲置令牌：{{ rentIdleNum }}
              </div>
          </div>
          <div class="scroll-area">
              <div class="tab-area">
                  <h3 class="tab-info">
                      <span>&nbsp;</span>碎片数量详情<img @click="showExplain" src="~assets/images/token/fq.png" alt="">
                  </h3>
                  <p class="tab-btn">
                      <span @click="chooseView(0)" :class="{'selected': tab == 0}">碎片视图</span><span @click="chooseView(1)" :class="{'selected': tab == 1}">令牌视图</span>
                  </p>
              </div>
              <div class="code-content">
                  <div class="chip-info">
                      <p><img src="~assets/images/token/chip1.png" alt="" />自有可用碎片：{{selfIdleNum * 5 + selfChipIdleNum}}</p>
                      <p :style="{opacity: rentNum > 0 ? 1 : 0}"><img src="~assets/images/token/chip2.png" alt="" />租借可用碎片：{{rentIdleNum * 5 + rentChipIdleNum}}</p>
                  </div>
                  <div class="fregment" v-show="tab == 0">
                      <router-fregment ref="fregment" @notifyParent="notifyParent"></router-fregment>
                  </div>
                  <div v-show="tab == 1" class="scroll-list-wrap"><!-- v-show="offerList && offerList.length > 0"-->
                      <!--<cube-scroll>--><!-- @pulling-down="onPullingDown"-->
                      <div class="code-item" v-for="(item, index) in offerList">
                          <div class="detail">
                              <div class="token">
                                  <p>
                                      <img v-if="item.tokenStatus == 2" src="~assets/images/token/token-x.png" alt="">
                                      <img v-if="item.tokenStatus == 3" src="~assets/images/token/token-z.png" alt="">
                                  </p>
                                  <h2 @click="tokenCancel(item.id)" :class="{'token-self': item.tokenStatus == 2, 'token-borrow': item.tokenStatus == 3}">
                                      <strong>{{item.nodeNum}}</strong><i>/5</i><span>撤销令牌</span>
                                  </h2>
                              </div>
                              <!--<div class="token">
                                  <p>
                                      <img v-if="item.tokenStatus == 2" src="~assets/images/token/token-x.png" alt="">
                                      <img v-if="item.tokenStatus == 3" src="~assets/images/token/token-z.png" alt=""><span>{{item.nodeNum}}</span>/5
                                  </p>
                              </div>
                              <div class="cancel">
                                  <p @click="tokenCancel(item.id)">撤销令牌</p>
                              </div>-->
                              <div class="arrow">
                                  <img @click="checkDetail(item.id, index, offerList)" v-if="tokenId == item.id" src="~assets/images/token/up.png" alt="">
                                  <img @click="checkDetail(item.id, index, offerList)" v-else src="~assets/images/token/down.png" alt="">
                              </div>
                          </div>
                          <div v-if="tokenId == item.id" class="chip-detail"><!---->
                              <div v-if="item.isLoading" style="text-align:center;font-size:12px;margin-bottom:10px;">
                                  <img style="vertical-align:middle;margin-right:5px;" src="~assets/images/token/loading.gif">加载中...
                              </div>
                              <div class="chip-content" v-if="!item.isLoading">
                                  <h4 v-for="(chip, i) in chipList">
                                      <strong>{{chip.name}}</strong>
                                      <img v-if="item.tokenStatus == 2" src="~assets/images/token/chip1.png" alt="" />
                                      <img v-if="item.tokenStatus == 3" src="~assets/images/token/chip2.png" alt="" />
                                      <span @click="chipCancel(chip.node_id, i, chipList, index, offerList)">撤销碎片</span>
                                  </h4>
                              </div>
                          </div>
                      </div>
                      <!--</cube-scroll>-->
                  </div>
                  <div class="no-result-wrapper" v-if="tab == 1 && offerList && offerList.length == 0">
                      <h2 class="no-result">
                          <img src="~assets/images/miningBoard/unstarted.png" alt="">
                          暂无明细
                      </h2>
                  </div>
              </div>
          </div>
      </cube-scroll>
      <div class="backtop" v-show="showBackTop" @click.stop="backToTop">
          <img src="~assets/images/miningboard/back-top.png" alt="" >
      </div>
      <!--<div class="mask" v-show="showMask" @click="closeMask($event)" @touchmove.prevent>
          <div ref="maskContent">


          </div>
      </div>-->
  </div>

</template>

<script>
  /*import md5 from 'js-md5';
  import 'common/js/gt';*/
  import routerFregment from './routerFregment.vue'
  import {userTokenInfo, depositRouterInfo, routerTokenList, routerTokenNodeList, chipDepositCancel, tokenDepositCancel } from 'api/register'

  export default {
    components: {
      routerFregment: routerFregment
    },
    data() {
      return {
        rentNum: 0,
        chipList: [],
        tokenId: 0,
        tab: 0,
        selfIdleNum: 0,
        rentIdleNum: 0,
        selfChipIdleNum: 0,
        rentChipIdleNum: 0,
        nodePledgeNum: 0,
        nodeNum: 0,
        tokenNum: 0,
        stepBtnOne: true,
        showBackTop: false,
        isIOS: false,
        showAdjust: false,
        rotateImg: false,
        violationNum: 0,
        showWarn: false,
        showAds: false,
        current: 1,

        tokenTotal: 0,
        token: {
          idleNum: 0,
          miningNum: 0,
          rentNum: 0,
          saleNum: 0
        },
        offerList: null,
        /*offerList: [],*/
        options: {
          click: true,
          tap: true,
          pullUpLoad: true/*,
          pullDownRefresh: {
            threshold: 90,
            stop: 50,
            txt: '刷新成功'
          }*/
        },

        showMask: false,
        per: 20,
        page: 1,
        sw: true
      }
    },
    beforeRouteEnter (to, from, next) {
      next((vm) => {
        let query = to.query;
        Object.assign(vm, query);
        vm.uid = query.uid;
        vm.token = query.token;
        vm.page = 1;
        vm.sw = true;
        vm.options.pullUpLoad = true;
        vm.setNormalStatus();
        vm.getUserTokenInfo();
        vm.getRouterTokenList();
      })
    },
    mounted() {
      let u = navigator.userAgent;
      // console.log(u);
      this.isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
      //console.log(this.isIOS);
      const h = document.body.scrollHeight;
      const H = window.innerHeight;



      // console.log(h);
      /*if (this.isIOS) {
        document.body.addEventListener('focusin', () => {
          this.showAdjust = true;
        })
        document.body.addEventListener('focusout', () => {
          this.showAdjust = false;
        })
      } else {
        window.addEventListener('resize', () => {
          if (window.innerHeight < H) {
            this.stepBtnOne = false;
          } else {
            this.stepBtnOne = true;
          }
        })


        window.onresize = function() {
          if (document.body.scrollHeight < h) {
            this.showAdjust = true;
          } else {
            this.showAdjust = false;
          }
        }
      }*/
    },
    watch: {

    },
    beforeDestroy() {

    },
    methods: {
      chooseView(val) {
        this.tab = val;
        this.tokenId = '';
      },
      checkDetail(id, index, arr) {
        if (this.tokenId == id) {
          this.tokenId = '';
        } else {
          this.chipList = [];
          routerTokenNodeList(id).then((data) => {
            if (data.status && data.status == 1) {
              setTimeout(() => {
                this.$set(arr[index], 'isLoading', false);
              }, 500);
              if (data.data && data.data.length > 0) {
                this.tokenId = id;
                this.chipList = data.data;
              }
            }
          }).catch((err) => {
            this.showToast(err.info, 'warn');
          })
        }
      },
      setNormalStatus() {
        this.showWarn = false;
        this.showAds = false;
        this.tokenId = '';
        this.tab = 0;
      },
      getUserTokenInfo() {
        depositRouterInfo().then((data) => {
          // console.log(data);
          if (data.status && data.status == 1) {
            if (data.data.router) {
              this.selfChipIdleNum = data.data.router.incompleteTokenNum;
              this.rentChipIdleNum = data.data.router.incompleteTokenRentNum;
              this.nodeNum = data.data.router.nodeNum;
              this.nodePledgeNum = data.data.router.nodePledgeNum;
              this.tokenNum = data.data.router.tokenPledgedNum;
            }
            if (data.data.num) {
              this.selfIdleNum = data.data.num.idleNum;
              this.rentNum = data.data.rentNum.idleNum + data.data.rentNum.miningNum;
            }
            if (data.data.rentNum) {
              this.rentIdleNum = data.data.rentNum.idleNum;
            }
          }
        }).catch((err) => {
          this.showToast(err.info, 'warn');
        })
      },
      getRouterTokenList() {
        routerTokenList(this.per, this.page).then((data) => {
          // console.log(data);
          if (data.data && data.data.length > 0) {
            for (let i = 0; i < data.data.length; i++) {
              let item = data.data[i];
              this.$set(item, 'isLoading', true);
            }
            this.offerList = data.data;
          }
          if (!data.data || data.data == null || data.data.length == 0) {
            this.offerList = [];
          }
        }).catch((err) => {
          this.showToast(err.info, 'warn');
        })
      },
      chipCancel(id, index, arr, index2, arr2) {
        // console.log(id, index, arr, index2, arr2);
        let nodeNum = arr2[index2].nodeNum;
        if (this.isCancelling) {
          return;
        }
        this.isCancelling = true;
        chipDepositCancel(id).then((data) => {
          if (data.status && data.status == 1) {
            this.isCancelling = false;
            nodeNum--;
            this.getUserTokenInfo();
            arr.splice(index, 1);
            if (arr.length > 0) {
              this.$set(arr2[index2], 'nodeNum', nodeNum);
            }
            if (arr.length == 0) {
              arr2.splice(index2, 1);
            }
            this.$refs.fregment.refresh();
            this.showToast('撤销成功', 'succcess');
          }
        }).catch((err) => {
          this.isCancelling = false;
          this.showToast(err.info, 'warn');
        })
      },
      tokenCancel(id) {
        if (this.isCancelling) {
          return;
        }
        this.isCancelling = true;
        tokenDepositCancel(id).then((data) => {
          if (data.status && data.status == 1) {
            this.showToast('撤销成功', 'succcess');
            this.isCancelling = false;
            this.getUserTokenInfo();
            this.page = 1;
            this.sw = true;
            this.options.pullUpLoad = true;
            this.getRouterTokenList();
            this.$refs.fregment.refresh();
          }
        }).catch((err) => {
          this.isCancelling = false;
          this.showToast(err.info, 'warn');
        })
      },
      notifyParent() {
        this.getUserTokenInfo();
        this.page = 1;
        this.sw = true;
        this.options.pullUpLoad = true;
        this.getRouterTokenList();
      },
      inputFocus() {

        setTimeout(function(){
          window.scrollTo(0,document.body.clientHeight);
        }, 500);

      },
      backToTop() {
        this.$refs.scroll.scrollTo(0,0,2000);
      },
      pageScroll({y}) {
        if(y < -380){
          this.showBackTop = true
        }else{
          this.showBackTop = false
        }
      },
      onPullingDown() {
        // this.offerList = [];
        this.page = 1;
        this.sw = true;
        this.options.pullUpLoad = true;
        this.getUserTokenInfo();
        this.getTokenTradeList();
      },
      onPullingUp() {
        this.page++;
        if (this.sw) {
          routerTokenList(this.per, this.page).then((data) => {
            if (data.data && data.data.length > 0) {
              for (let i = 0; i < data.data.length; i++) {
                let item = data.data[i];
                this.$set(item, 'isLoading', true);
              }
              this.offerList = this.offerList.concat(data.data);
              this.sw = true;
            }
            if (!data.data || data.data == null || data.data.length == 0) {
              this.sw = false;
              this.options.pullUpLoad = false;
              return;
            }
          }).catch((err) => {
            this.showToast(err.info, 'warn');
          })
        }
      },
      showExplain() {
        this.showAds = true;
      },

      closeActive() {
        this.showAds = false;
      },
      closeWarn() {
        this.showWarn = false;
      },
      closeMask(ev) {
        if (!this.$refs.maskContent.contains(ev.target)) {
          this.showMask = false;
          this.showShopping = false;
          this.showConfirm = false;
          this.showPay = false;
          this.showIdCheck = false;
          this.showResult = false;

          /*关闭弹框时将当前已经输入的支付密码清空*/
          this.password = {
            num1: -1,
            num2: -1,
            num3: -1,
            num4: -1,
            num5: -1,
            num6: -1
          };
          this.payPwd = '';
          this.payPassword = '';
          this.countdown = 120;
          this.countdown2 = 300;
          this.cancelSetIntervalCountdown();
          this.showFlag = true;
          this.cancelCodeIntervalCountdown();
          this.countdown1 = 60;

          /*if (this.payStatus == 2) {
            this.payStatus = 1;  //  payStatus:1,表示当前处于选择不同会员经销商，payStatus:2，表示当前处于支付弹框状态
            this.showPay = false;
          }*/
        }
      },
      showToast(msg, type) {
        const toast = this.$createToast({
          time: 2000,
          txt: msg,
          type: type
        });
        toast.show();
      }
    }
  }
</script>

<style lang="scss" scoped>
  .pag {
    background: #F5F5FB;
    height: 100%;
    font-size:30px;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .pledge-banner {
    //width:690px;
    height:266px;
    border-radius:14px 14px 0 0;
    margin: 34px 30px 0 30px;
    padding-top: 56px;
    h3 {
      padding-right: 68px;
      font-size:40px;
      font-weight:600;
      color:rgba(255,255,255,1);
      text-shadow:0 2px 4px rgba(0,89,240,0.5);
      margin-bottom: 16px;
      text-align: right;
    }
  }

  .pledge-banner-content {
    width:360px;
    height:138px;
    background:rgba(255,255,255,.2);
    border-radius:10px;
    margin-right: 64px;
    margin-left: auto;
    text-align: center;
    padding-top: 16px;
    font-size: 26px;
    color: #fff;
    div {
      margin-bottom: 16px;
      i {
        padding: 0 5px;
        font-style: normal;
      }
    }
  }



  .router-pledge {
    background: url("~assets/images/token/router.png") 24px center / 174px 174px no-repeat,
    linear-gradient(210deg,rgba(73,189,250,1) 0%,rgba(43,117,243,1) 100%);
  }


  .token-types {
    height: 104px;
    background: #fff;
    font-size:30px;
    color:rgba(29,40,88,1);
    display: flex;
    align-items: center;
    justify-content: center;
    img {
      width: 58px;
      height: 58px;
      margin-right: 12px;
    }
    span {
      margin-right: 38px;
    }
  }






  .scroll-area{
    /*height:calc(100% - 370px);*/

    // background:rgba(255,255,255,1);
    .tab-area{
      display:flex;
      justify-content:space-between;
      align-items:center;
      margin-top:24px;
      padding:0 30px;

      .tab-info{
        font-size:34px;
        color:#202C5B;
        span{
          display:inline-block;
          width:6px;
          /*height:36px;*/
          margin-right:15px;
          background:rgba(43,117,243,1);
        }
        img{
          display:inline-block;
          width:36px;
          height:36px;
          margin-left:23px;
          vertical-align:middle;
        }
      }
      .tab-btn{
        width:360px;
        height:72px;
        line-height:72px;
        border-radius:10px 10px 0 0;
        background:#E5E5E9;
        span{
          display:inline-block;
          width:49.99999%;
          height:100%;
          text-align:center;
          font-size:30px;
          color:#838899;
          cursor:pointer;
        }
        .selected{
          color:#1D2858;
          background:rgba(255,255,255,1);
          border-radius:10px 10px 0 0;
        }
      }
    }

  }
  .adjust-height{
    /*height:calc(100% - 586px);*/
  }
  .code-content{
    background:#fff;
    /*height:calc(100% - 46px);*/
    .chip-info{
      display:flex;
      padding:7px 46px 7px 50px;
      justify-content:space-between;
      align-items:center;
      border-bottom:1px solid #f5f5f5;
      p{
        /*flex:1;*/
        display:flex;
        align-items:center;
        font-size:26px;
        color:#1D2858;
        img{
          width:58px;
          height:58px;
          margin-right:12px;
        }
      }
      /*p:last-child{
        margin-left:auto;
      }*/
    }
    .no-result-wrapper{
      position:relative;
      height:calc(100vh - 570px);
      h2{
        /*padding:12px 0;*/
        position:absolute;
        width:250px;
        height:330px;
        top:-48px;
        bottom:0;
        left:0;
        right:0;
        margin:auto;
        text-align:center;
        color: #838899;
        font-size:26px;
        img{
          display:block;
          margin:0 auto 20px;
          width:250px;
          height:274px;
        }
      }
    }

  }
  .fregment{
    min-height:calc(100vh - 570px);
  }
  .scroll-list-wrap{
    /*height:100%;*/
    background:#fff;
    padding-top:24px;
    padding-bottom:1px;
  }
  .code-item{
    width:690px;
    margin:1px auto 23px;
    /*padding: 12px 0 32px;*/
    /*padding: 32px 0 32px;*/
    box-shadow:0 0 6px 0 rgba(102,102,102,0.3);
    border-radius:14px;
    .title{
      display:flex;
      justify-content:space-between;
      align-items:center;
      span{
        width:270px;
        padding:2px 21px 3px 13px;
        background:rgba(23,62,143,0.4);
        border-radius:0 14px 14px 0;
        font-size:24px;
        color:rgba(255,255,255,1);
      }
      i{
        margin-right:74px;
        font-style:normal;
      }
      strong{
        display:inline-block;
        padding:14px 46px 13px;
        background:rgba(23,62,143,1);
        border-radius:10px 0 0 10px;
        font-size:26px;
        color:rgba(255,255,255,1);
        cursor:pointer;
      }
    }
    .detail{
      display:flex;
      /*margin-top:32px;*/
      justify-content:space-between;
      align-items:center;
      padding:19px 24px 19px 19px;
      .token{
        display:flex;
        align-items:center;
        /*height:58px;
        line-height:58px;*/
        p{
          display:inline-block;
          /*display:flex;
          align-items:center;*/
          height:58px;
          line-height:58px;
          font-size:24px;
          color:#838899;
          img{
            position:relative;
            z-index:100;
            width:58px;
            height:58px;
            vertical-align:top;
          }
          span{
            font-size:34px;
            color:#202C5B;
          }
        }
        h2{
          display:flex;
          position:relative;
          z-index:1;
          /*display:inline-block;*/
          align-items:center;
          width:250px;
          height:40px;
          margin-left:-30px;
          border-radius:0 20px 20px 0;
          strong{
            margin-top:2px;
            margin-left:54px;
            font-size:34px;
            color:#202C5B;
          }
          i{
            margin-top:6px;
            margin-right:30px;
            font-size:24px;
            color:#838899;
            font-style:normal;
          }
          span{
            font-size:26px;
            color:#202C5B;
          }
        }
        .token-self{
          background:rgba(225,228,244,1);
          border:1px solid rgba(122,138,223,1);
        }
        .token-borrow{
          background:rgba(225,243,240,1);
          border:1px solid rgba(92,191,174,1);
        }
      }
      .cancel{
        p{
          width:150px;
          height:60px;
          line-height:60px;
          font-size:26px;
          color:rgba(220,6,48,1);
          border:1px solid rgba(220,6,48,1);
          border-radius:8px;
          text-align:center;
          cursor:pointer;
        }
      }
      .arrow{
        img{
          width:44px;
          height:44px;
        }
      }
    }
    .chip-detail{
      .chip-content{
        border-top:1px solid #F5F5F5;
        h4{
          display:flex;
          align-items:center;
          justify-content:space-between;
          margin:0 24px;
          padding:14px 24px;
          border-bottom:1px solid #F5F5F5;
          strong{
            flex:1;
            display:inline-block;
            max-width:340px;
            height:35px;
            line-height:35px;
            white-space:nowrap;
            overflow:hidden;
            text-overflow:ellipsis;
            font-size:26px;
            color:#202C5B;
          }
          img{
            width:74px;
            height:74px;
            margin-right:80px;
          }
          span{
            display:inline-block;
            padding:12px 0;
            font-size:26px;
            color:#DC0630;
            cursor:pointer;
          }
        }
      }
    }
  }


  .mask{
    position:fixed;
    z-index:9991;
    height:100%;
    width:100%;
    top:0;
    bottom:0;
    left:0;
    right:0;
    background:rgba(0, 0, 0, 0.5);

    .general-height{
      /*height: 500px;*/
      height: 67.46vh;
      background:rgba(255,255,255,1);
    }
    .special-height{
      height: 55.46vh!important;
      background:rgba(255,255,255,1);
    }
    .title{
      position:relative;
      padding:29px 0 28px;
      font-size:34px;
      border-bottom:1px solid rgba(245,245,245,1);
      color:#202C5B;
      text-align:center;
      img{
        position:absolute;
        left:30px;
        top:27px;
        width:20px;
        height:34px;
      }
    }
    .number-group{
      position:absolute;
      z-index:9992;
      bottom:0;
      left:0;
      right:0;
      height:448px;
      >div:first-child{
        border-top:1px solid rgba(245,245,245,1);
      }
      .number-btn{
        display:flex;
        div{
          flex:1;
          height:111px;
          line-height:111px;
          font-size:50px;
          color:#333;
          text-align:center;
          border-bottom:1px solid rgba(245,245,245,1);
          border-right:1px solid rgba(245,245,245,1);
          -webkit-tap-highlight-color:rgba(0,0,0,0.15);
        }
        div:active{
          background:rgba(0,0,0,0.15);
        }
        div:last-child{
          border-right:none;
        }
        .no-num{
          background:#e3e7ee;
          img{
            width:44px;
            height:32px;
            display:block;
            margin:40px auto;
          }
        }
      }
    }
    .shopping-detail{
      position:fixed;
      width:100%;
      bottom:0;
      left:0;
      right:0;

      .content{
        margin:97px 30px 0;
        h2{
          margin-bottom:66px;
          text-align:center;
          font-size:30px;
          color:#202C5B;
          font-weight:600;
          span{
            font-size:72px;
          }
        }
        p{
          display:flex;
          justify-content:space-between;
          font-size:28px;
          padding-bottom:29px;
          border-bottom:1px solid #ececec;
          span{
            color:#71768C;
          }
          strong{
            color:#202C5B;
          }
          input{
            width:250px;
            height:84px;
            text-indent:15px;
            background:rgba(248,248,248,1);
            border:1px solid rgba(23,62,143,1);
            border-radius:6px;
          }
        }
        p:last-child{
          margin-top:30px;
        }
        h4{
          font-size:28px;
          text-align:center;
          color:#71768C;
          span{
            color:#EB3257;
          }
        }
      }
      .confirm-content{
        margin:32px 30px 0;
        h1{
          margin-bottom:65px;
          font-size:28px;
          color:#71768C;
          text-align:center;
          span{
            color:#EB3257;
          }
        }
        .number{
          margin-top:30px;
        }
      }
      .official-content{
        p{
          padding-bottom:52px;
          align-items:center;
          border-bottom:none;
        }
        .warn{
          padding:0 30px;
          line-height:1.65;
          font-size:24px;
        }
      }
      .result{
        /*margin-top:97px;*/
        margin-top:45px;
        text-align:center;
        img{
          width:80px;
          height:80px;
          margin-bottom:41px;
        }
        h3{
          margin-bottom:20px;
          font-size:28px;
          color:#202C5B;
        }
        p{
          font-size:24px;
          color:#71768C;
        }
      }
      .pay-btn{
        position:absolute;
        bottom:30px;
        height:84px;
        line-height:84px;
        text-align:center;
        background:rgba(23,62,143,1);
        border-radius:8px;
        color:#fff;
        width:calc(100% - 60px);
        margin:0 30px;
        font-size:34px;
      }
    }
    .pay-password{
      position:fixed;
      width:100%;
      bottom:0;
      left:0;
      right:0;
      .password-wrapper{
        display:flex;
        margin:43px 30px 0;
        height:88px;
        line-height:88px;
        border:1px solid rgba(209,209,209,1);
        border-radius:10px;
        span{
          flex:1;
          text-align:center;
          border-right:1px solid rgba(209,209,209,1);
          strong{
            display:block;
            width:20px;
            height:20px;
            border-radius:50%;
            background:#333;
            margin:34px auto;
          }
        }
        span:last-child{
          border-right:none;
        }
      }
      .forget-password{
        color:#1253FC;
        width:25%;
        padding:12px 0;
        margin:12px auto 0;
        text-align:center;
        font-size:28px;
      }
      .pay-loading{
        position:absolute;
        z-index:9993;
        bottom:0;
        left:0;
        right:0;
        height:calc(100% - 70px);
        background:#fff;
        .paying{
          position:absolute;
          left:50%;
          top:50%;
          transform:translate(-50%, -50%);
          text-align:center;
          font-size:30px;
          color:#4B74E8;
          img{
            display:block;
            width:40px;
            height:40px;
            margin:0 auto 15px;
          }
        }
      }

    }
    .id-check{
      position:fixed;
      width:100%;
      bottom:0;
      left:0;
      right:0;
      .check-title{
        position:relative;
        img{
          position:absolute;
          left:30px;
          top:29px;
          width:34px;
          height:34px;
        }
      }
      .check-content{
        margin-top:32px;
        padding:0 30px;
        p{
          text-align:center;
          color:#202C5B;
          font-size:26px;
          line-height:1.5;
        }
        .sms-input{
          height:84px;
          line-height:84px;
          margin-top:28px;
          input{
            display:inline-block;
            height:84px;
            line-height:84px;
            width:59.9999%;
            text-indent:22px;
            font-size:30px;
            border-radius:10px 0 0 10px;
            border:1px solid rgba(227,227,227,1);
            border-right:none;
            box-shadow:0 0 0 rgba(0,0,0,0);
            -webkit-appearance:none;
            outline:none;
            background:#F6F7F8;
          }
          span{
            display:inline-block;
            width:39.9999%;
            height:84px;
            line-height:84px;
            border-radius:0 10px 10px 0;
            vertical-align:top;
            background:#D1D1D1;
            color:#fff;
            font-size:30px;
            text-align:center;
            /*border:1px solid rgba(227,227,227,1);
            border-left:none;*/
          }
        }
        .finish-btn{
          height:84px;
          line-height:84px;
          margin-top:32px;
          text-align:center;
          color:#fff;
          font-size:34px;
          border-radius:8px;
          background:rgba(23,62,143,0.5);
        }
        .success{
          background:rgba(23,62,143,1);
        }
      }
    }
    .adjust-bottom{
      bottom:-15px!important;
    }
  }

  .active-ct{
    position:relative;
    width:84.53333vw;
    height:auto;
    margin:0 auto;
    border-radius:14px;
    background:#fff;
    .content{
      /*background:#1E213C;*/
      /*margin:0 auto;*/

      /*width:92vw;*/

      /*height:105.33vw;*/
      padding:45px 16px 0;
      margin-bottom:22px;
      -webkit-overflow-scrolling: touch;
      /*overflow:auto;*/
      h2{
        margin-bottom:28px;
        color:#202C5B;
        text-align:center;
        font-size:32px;
      }
      p{
        padding:0 16px;
        color:#202C5B;
        font-size:30px;
        line-height:1.75;
      }
      h3{
        line-height:1.75;
        margin-top:-25px;
        margin-bottom:20px;
        /*border-top:1px solid #F1F2F7;*/
        padding-top:30px;
        padding-left:17px;
        font-size:30px;
        color:#71768C;
        span{
          color:#EB3257;
        }
      }
      h1{
        margin-bottom:25px;
        font-size:30px;
        font-weight:600;
        color:#202C5B;
      }
      /*img{
        display:block;
        width:100%;
        min-height:500px;
        height:auto;
        border-radius:6px;
      }*/
    }
    .close{
      /*position:absolute;*/
      z-index:9999;
      width:100%;
      height:108px;
      line-height:108px;
      border-top:1px solid #D0D4E4;
      /*bottom:160px;*/
      /*margin-top:-390px;*/
      cursor:pointer;
      p{
        font-size:30px;
        color:#1253FC;
        text-align:center;
        /*img{
          width:42px;
          height:42px;
          margin-right:20px;
          vertical-align:middle;
        }*/
      }
      /*>img{
        width:70.2%;
      }*/
    }
  }

  .backtop {

    position: fixed;
    right: 10px;
    bottom: 120px;
    z-index: 500;
    width: 66px;
    height: 66px;
    display: flex;
    align-items: center;
    justify-content: center;

    img {
      width: 46px;
      height: 46px;
      display: block;
    }
  }

  /*.refresh-img-rotate{

    animation: img-Rotate 0.5s linear 1 forwards;
  }
  @keyframes img-Rotate {
    0%{
      transform-origin: 50% 50%;
      transform:rotate(0deg);
    }
    50%{
      transform-origin: 50% 50%;
      transform:rotate(90deg);
    }
    100%{
      transform-origin: 50% 50%;
      transform:rotate(180deg);
    }
  }*/

  .fixed-position{
    position:fixed;
  }
  .static-position{
    position:absolute;
  }

  .fade-enter-active, .fade-leave-active{
    /*opacity:1;
    background: rgba(7, 17, 27, 0.8);*/
    transition: all 0.5s;
    transform:translate(0, 0);
  }
  .fade-enter, .fade-leave-active{
    /*opacity:0;
    background:rgba(7, 17, 27, 0);*/
    transform: translate(0, 100%);
  }
  input::-webkit-input-placeholder{
    color: #B7C3D1;
    font-size:26px;
  }
</style>
<style>
  .cube-toast-tip{
    /*max-width:13em;*/
    font-size:28px;
    max-width:15.5em;
    max-height:6em;
    line-height:40px;
  }
  .cube-toast.cube-popup {
    z-index: 10000!important;
  }
</style>











